<!DOCTYPE html>
<html>
<head>
	<script type="text/javascript" src="../../layui/layui.all.js"></script>
	<link rel="stylesheet" type="text/css" href="../../layui/css/layui.css">
	<script type="text/javascript" src="../../js/jquery-1.8.3.js"></script>
	<link rel="icon" href="http://39.105.94.75:88/img/favicon.ico">
<!--	<link rel="Shortcut Icon" href="" type="image/x-icon" />这个不能用-->
	<script type="text/javascript" src="../../js/api.js"></script>
	<meta charset="utf-8" />
	<title>首页</title>
</head>
<body>
<!--头部导航栏信息-->
<div class="layui-fluid">
	<div class="layui-row">
		<ul class="layui-nav">
			<div class="layui-col-md9">
				<li class="layui-nav-item"><a href="">首页</a></li>
				<li class="layui-nav-item"><a href="book.htm">图书</a></li>
				<li class="layui-nav-item"><a href="">电子书</a></li>
				<li class="layui-nav-item"><a href="">教育培训</a></li>
				<li class="layui-nav-item"><a href="">家教平台首页</a></li>
			</div>
			<li class=" layui-nav-item"><a href="logintest.htm"><i class="layui-icon layui-icon-username" style="font-size: 15px;" id="session_name">未登录</i>
				<!-- <img src=" " class="layui-nav-img"> --></a>
				<dl class="layui-nav-child">
					<dd><a href="">基本资料</a></dd>
					<dd><a href="">安全设置</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item"><a href="#" style="font-size: 15px;"  id="cencel">注销</a></li>
		</ul>
	</div>
</div>

<!--头部导航栏信息结束-->
<div class="content">

	<center><div class="layui-carousel" id="lunbo">
		<div carousel-item>
			<div><img src="../../img/1.jpg" style="width:100% ;height:100%" ></div>
			<div><img src="../../img/2.jpg" style="width:100% ;height:100%" ></div>
			<div><img src="../../img/3.jpg" style="width:100% ;height:100%" ></div>
			<div><img src="../../img/4.jpg" style="width:100% ;height:100%" ></div>
			<div><img src="../../img/5.jpg" style="width:100% ;height:100%" ></div>
		</div>
	</div></center>
	<center>
		<div style="width: 80% ; height: auto; border: #000000 1px solid;">
			<div style="width: 32%; height: 500px; border:#000000 1px solid; float: left;">
				热销推荐
			</div>
			<div style="width: 32%; height: 500px; border: #000000 1px solid; float: left;">
				<div style="width:auto; height: 50%;border: #000000 1px solid">
					热销推荐
				</div>
				<div style="width:auto; height: 50%; border: #000000 1px solid;">
					<div style="width:49%; height: 99%; border:#000000 1px solid; float:left"></div>
					<div style="width:49%; height: 99%; border:#000000 1px solid; float:left"></div>
				</div>
			</div>
			<div style="width: 32%; height: 500px; border: #000000 1px solid; float: left;">
				<div style="width: auto; height: 50%; border: #000000 1px solid;">
					热销推荐12请
				</div>
				<div style="width: auto; height: 50%; border: #000000 1px solid;">
				</div>
			</div>
		</div>
	</center>
	<!-- 底部固定区域 -->
	<div class="layui-footer" style="position: fixed; bottom: 0;background-color:	#000011;width:100%;height:50px" align="center">
		<li style="font-size: 15px; color: #666a62;">地中海家教平台 ©ChuZhong1008@gmail.com - 版权归初衷所有	</li>
	</div>
	<!-- 底部固定区域结束 -->
</div>
</body>
<script>
	layui.use(['layer'],function () {
		var layer = layui.layer;
	})
	layui.use('carousel', function() {
		var carousel = layui.carousel;
		//建造实例
		carousel.render({
			elem: '#lunbo',
			width: '90%', //设置容器宽度,
			height: '400px', //设置容器宽度,
			//arrow: 'always', //始终显示箭头
			anim: 'fade' //切换动画方式,
			,interval: '1000'
		});
	});
	$(function () {
		// window.onload=sessionname();
		window.onload=token_index();
		function token_index(){
			var item = window.localStorage.getItem('token');
			$.ajax({
				url:"Test_token.do",
				type:"get",
				dataType:"json",
				beforeSend:function (xhr) {
					xhr.setRequestHeader("token",item);
				},
				success:function (data) {
					var stuName = data.stu_name;
					if(stuName == ""||stuName == null ||stuName=="undefined"||stuName=="false"){
						console.log("没有数据！请登录")
					}else{
						$("#session_name").replaceWith('<i class="layui-icon layui-icon-username" style="font-size: 15px;">'+stuName+'</i>');
						console.log("查询成功！！！！"+stuName)
					}
				}
			})
		}
		$('#cencel').click(function () {
			yorn();
		});
	})
</script>
</html>
